package com.lch.mebatis.v1;

import java.lang.reflect.Proxy;
import java.util.ResourceBundle;

/**
 * @author: liuchenhui
 * @create: 2019-05-09 22:13
 **/
public class LchConfiguration {

    public final static ResourceBundle sqlMappings;

    static {
        sqlMappings = ResourceBundle.getBundle("mebatis");
    }

    public <T> T getMapper(Class clazz, LchSqlSession lchSqlSession) {
        return (T) Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[]{clazz}, new LchMapperProxy(lchSqlSession));
    }
}
